<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/22
  Time: 10:00
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<html>
<head>
    <title>菜单</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <script type="text/javascript" src="${pageContext.request.contextPath }/menu/mymenu.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/menu/mymenu.css" type="text/css" media="all">
    <script language="javascript">
        var bar1 = new Q6MenuBar("bar1", "后台管理");
        function load() {
            // 设置配色方案：0,1,2,3
            bar1.colorStyle = 3;
            // 指定图片的路径
            bar1.config.imgDir = "${pageContext.request.contextPath}/menu/img/";
            // 多个菜单是否相互排斥
            bar1.config.radioButton=true;
            /*
            添加菜单或菜单条目
            1. 这里不会出现同名菜单（第一次添加时指定了名为a的菜单，下次再添加名为a的菜单，就不会添加了）
              > "分类管理" --> 菜单名称
              > "查看分类" --> 菜单条目名称
              > "#" 点击条目时要请求的地址
              > "body" --> 请求后的响应结果在哪个框架中显示
            */
            bar1.add("汽车管理", "查询自己汽车信息", "${pageContext.request.contextPath}/car/InquireMyCar", "body");
            bar1.add("汽车管理", "查询所有汽车信息", "${pageContext.request.contextPath}/car/InquireAllCar", "body");
            bar1.add("汽车管理", "查询所有汽车信息分页", "${pageContext.request.contextPath}/car/InquireAllCarByPage?currentPage=1", "body");

            // 获取id为menu的元素，它是一个<div>
            var d = document.getElementById("menu");
            // 把菜单栏转换成字符串，作用<div>元素的内容
            d.innerHTML = bar1.toString();
        }
    </script>

</head>

<body onload="load()" style="margin: 0px; background: rgb(25,119,176);">
<div id="menu"></div>
</body>
</html>
